//button点击防并发，0.3s内禁止第二次点击
import Vue from 'vue'
Vue.directive('prevent-concurrent', {
  bind: function(el) {
    el.addEventListener('click', function() {
      this.disabled = true;
      let that = this;
      setTimeout(function() {
        that.disabled = false;
      }, 300)
    });
  }
});